package com.example.duomeitijuhe.ui;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.ImageButton;
import com.example.duomeitijuhe.R;
import com.example.duomeitijuhe.others.ActivityCollector;
import com.example.duomeitijuhe.ui.fragments.MainActivity;

/**
 * Created by Michael on 2014/10/13.
 */
public class PlatformBindActivity extends Activity implements View.OnClickListener{

    ImageButton sinaBindButton;
    ImageButton renrenBindButton;
    ImageButton qqBindButton;
    Button backButton;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.bind_platforms);
        ActivityCollector.addActivity(this);
        initData();
        sinaBindButton.setOnClickListener(this);
        backButton.setOnClickListener(this);
    }

    public void initData(){
        sinaBindButton = (ImageButton)findViewById(R.id.sina_oauth_image_button);
        renrenBindButton = (ImageButton)findViewById(R.id.renren_oauth_image_button);
        qqBindButton = (ImageButton)findViewById(R.id.qq_oauth_image_button);
        backButton = (Button)findViewById(R.id.back_button);
    }
    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.sina_oauth_image_button:
                Intent intent = new Intent(PlatformBindActivity.this,SinaBindedActivity.class);
                startActivity(intent);
                break;
            case R.id.back_button:
                Intent intent1 = new Intent(PlatformBindActivity.this,MainActivity.class);
                startActivity(intent1);
                break;
            default:
                break;
        }
    }
}